package com.elh.jpa.service;

import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;
import java.util.List;

@Transactional(rollbackFor = Exception.class)
public interface InsertService<T extends Serializable,ID> {

    <S extends T> S save(S entity);

    <S extends T> List<S> saveAll(Iterable<S> entities);
}
